const proxy = {
  'GET /mock/get/test': {
    errMsg: null,
    code: 200,
    data: {
      id: 1,
      name: '零三',
      url: 'https://web03.cn'
    }
  },
  'POST /mock/post/test': (req, res) => {
    console.log(req,res)
    res.send({
      errMsg: null,
      code: 200,
      data: [
        {
          id: 1,
          name: '零三',
          url: 'https://web03.cn'
        },
        {
          id: 2,
          name: '零零三',
          url: 'https://web03.cn'
        }
      ]
    });
  },
  'GET /mock/error/test': {
    errMsg: '服务器异常，请稍后再试',
    code: 500,
    data: null
  },
  // 权限路由
  'POST /mock/post/authority/test': (req, res) => {
    console.log(req,res)
    res.send({
      errMsg: null,
      code: 200,
      data: {
        userInfo: {
          name:'零三',
          id: 30
        },
        permissionUrl:[
          {
            id: 1,
            url: '/home'
          },
          {
            id: 2,
            url: '/collect'
          },
          {
            id: 3,
            url: '/personal'
          },
          {
            id: 4,
            url: '/t1/*'
          }
        ]
      }
    });
  }
}
module.exports = proxy
